{% init show_menu = True %}
{% init show_nav  = True %}
{% init search_placeholder = "搜索或指令" %}
{% init search_action = "/search/search" %}

{% if show_menu and show_nav %}
<div class="nav">
  <!-- 保持对称 -->
  <div class="nav-container">
    <div class="menu-box float-left">
      <ul class="nav-ul">
        {% if _has_login %}
          <li class="nav-item"><a class="menu-link" href="/note/index">{{T("笔记")}}</a></li>
          <li class="nav-item"><a class="menu-link" href="/note/recent?orderby=view">{{T("动态")}}</a></li>
          <li class="nav-item"><a class="menu-link" href="/note/public">{{T("公共")}}</a></li>
          <li class="nav-item desktop-only"><a class="menu-link" href="/plugins_list">{{T("插件")}}</a></li>
          {% if _is_admin %}
            <li class="nav-item desktop-only"><a class="menu-link" href="/fs_bookmark">{{T("文件")}}</a></li> 
          {% end %}
          <li class="nav-item"><a class="menu-link" href="/system/settings">{{T("设置")}}</a></li>
        {% end %}
        
        {% if not _has_login %}
          <li class="nav-item"><a class="menu-link" href="/">{{T("笔记")}}</a></li>
          <li class="nav-item"><a class="menu-link" class="link" href="/login">{{T("Login")}}</a></li>
        {% end %}

      </ul>
    </div>

    <div class="nav-search">
      <form id="searchForm" method="GET" action="{{search_action}}">
        {% include common/search_box.html %}
      </form>
    </div>
  </div>
</div>
{% end %}
